#ifndef _LVGL_LED_H
#define _LVGL_LED_H

#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>

#include "../../lvgl/lvgl.h"
#include "../lv_project_inc/lvgl_lock.h"

lv_led_t *led_lroom_s;
lv_led_t *led_mroom_s;
lv_led_t *led_sroom_s;
lv_led_t *led_broom_s;

lv_obj_t *layout_led_controll;

lv_led_t *led_lroom_b;
lv_led_t *led_mroom_b;
lv_led_t *led_sroom_b;
lv_led_t *led_broom_b;

int fd_led;

bool state_led_lroom;
bool state_led_mroom;
bool state_led_sroom;
bool state_led_broom;

void lvgl_layout_led(lv_obj_t *obj);
void lvgl_led_event_handler(lv_event_t *e);
void lvgl_led_controll_event_handler(lv_event_t *e);
void lvgl_led_controll();
void lvgl_led_init();
void lvgl_led_close_event_handler(lv_event_t *e);
void lvgl_led_controll_handle(lv_led_t *led_b,lv_led_t *led_s,char id_led,bool *state_led,bool flag);

#endif